Optimal. Leaf size=245 \[ \frac{\left (\frac{2 c d-b f}{\sqrt{b^2-4 a c}}+f\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (f-\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{(2 c e-b g) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{g \log \left (a+b x^2+c x^4\right )}{4 c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.159176, antiderivative size = 245, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 8, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {1673, 1166, 205, 1247, 634, 618, 206, 628} \[ \frac{\left (\frac{2 c d-b f}{\sqrt{b^2-4 a c}}+f\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (f-\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{(2 c e-b g) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{g \log \left (a+b x^2+c x^4\right )}{4 c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1673
Rule 1166
Rule 205
Rule 1247
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2+g x^3}{a+b x^2+c x^4} \, dx &=\int \frac{d+f x^2}{a+b x^2+c x^4} \, dx+\int \frac{x \left (e+g x^2\right )}{a+b x^2+c x^4} \, dx\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{e+g x}{a+b x+c x^2} \, dx,x,x^2\right )+\frac{1}{2} \left (f-\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx+\frac{1}{2} \left (f+\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx\\ &=\frac{\left (f+\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (f-\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{g \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c}+\frac{(2 c e-b g) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c}\\ &=\frac{\left (f+\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (f-\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b+\sqrt{b^2-4 a c}}}+\frac{g \log \left (a+b x^2+c x^4\right )}{4 c}-\frac{(2 c e-b g) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c}\\ &=\frac{\left (f+\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (f-\frac{2 c d-b f}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b+\sqrt{b^2-4 a c}}}-\frac{(2 c e-b g) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{g \log \left (a+b x^2+c x^4\right )}{4 c}\\ \end{align*}
Mathematica [A] time = 0.31004, size = 280, normalized size = 1.14 \[ \frac{\frac{2 \sqrt{2} \sqrt{c} \left (f \left (\sqrt{b^2-4 a c}-b\right )+2 c d\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b-\sqrt{b^2-4 a c}}}+\frac{2 \sqrt{2} \sqrt{c} \left (f \left (\sqrt{b^2-4 a c}+b\right )-2 c d\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{\sqrt{b^2-4 a c}+b}}+\left (g \left (\sqrt{b^2-4 a c}-b\right )+2 c e\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )+\left (g \left (\sqrt{b^2-4 a c}+b\right )-2 c e\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{4 c \sqrt{b^2-4 a c}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.019, size = 866, normalized size = 3.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{g x^{3} + f x^{2} + e x + d}{c x^{4} + b x^{2} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]